<?php

/**
 * This is the model metadata class for table "goods_price_time".
 */
class GoodsPriceTimeMetadata extends CARMDC
{
	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'goods_price_time';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('name', 'length', 'max'=>30),
			array('price_market, price_agent, price_dealer, price_refer', 'length', 'max'=>10),
			array('goods_id', 'length', 'max'=>20),
			array('begin_time, end_time', 'safe'),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('id, name, begin_time, end_time, price_market, goods_id, price_agent, price_dealer, price_refer', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'id' => 'ID',
			'name' => 'Name',
			'begin_time' => 'Begin Time',
			'end_time' => 'End Time',
			'price_market' => '销售价格',
			'goods_id' => 'Goods',
			'price_agent' => 'Price Agent',
			'price_dealer' => 'Price Dealer',
			'price_refer' => 'Price Refer',
		);
	}
}